package com.zy.explore.alibaba.interfaces.facade.example;


import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@Api("nacos配置示例Facade")
@RestController
@RequestMapping("/config")
@RefreshScope
public class ConfigExampleFacade {

    @Value("${useLocalCache:false}")
    private boolean useLocalCache;

    @ApiOperation("获取配置")
    @GetMapping("/get")
    public boolean get() {
        return useLocalCache;
    }

}
